PL <- read.csv ("Freitags.csv", h=T)
head(PL)
plot(PL$Konz, PL$Plasmo)
qqnorm(PL$Plasmo)
qqline(PL$Plasmo)
plot(PL$Konz, PL$Plasmo, ylab="Plasmolyserate (%)", xlab="Konzentration (M)", las=1)
abline(lm(PL$Plasmo~PL$Konz), lwd=2)
PL$Proportion <- PL$Plasmo/100
PL$TransRate <- asin(sqrt(PL$Proportion))
qqnorm(PL$TransRate)
qqline(PL$TransRate)
plot(PL$Konz, PL$TransRate, ylab="Plasmolyserate (transformiert)", xlab="Konzentration (M)", las=1)
abline(lm(PL$TransRate~PL$Konz), lwd=2)
RateKonz <- tapply(PL$Konz, list(PL$Konz), mean)
RateMeans <- tapply(PL$Plasmo, list(PL$Konz), mean)
RateSD <- tapply(PL$Plasmo, list(PL$Konz), sd)
RateSDminus <- RateMeans - RateSD
RateSDplus <- RateMeans + RateSD
require(sciplot)
PL$Gruppe <- factor(PL$Konz)
lineplot.CI(Konz, Plasmo, data = PL, lty="blank", 
            xlab = "Konzentration (M)", ylab = "Plasmolyserate (%)", cex.lab = 1.5, 
            col = "blue", ci.fun= function(x) c(mean(x)-sd(x), mean(x)+sd(x)))

require(gplots)
plotCI(x = RateKonz, y = RateMeans, err='y', 
       type="p", col="blue", barcol="blue",
       sfrac = 0.01, gap=0, lwd=2,
       lty="solid", labels=FALSE, xlab = "Konzentration (M)", ylab = "Plasmolyserate (%)", 
       li=RateSDminus, ui=RateSDplus)
abline(lm(RateMeans~RateKonz), lwd=2, col="red")
abline(lm(PL$Plasmo~PL$Konz), lwd=2, col="blue")

TransRateMeans <- tapply(asin(sqrt(PL$Plasmo/100)), list(PL$Konz), mean)
TransRateSD <- tapply(asin(sqrt(PL$Plasmo/100)), list(PL$Konz), sd)
TransRateSDminus <- TransRateMeans - TransRateSD
TransRateSDplus <- TransRateMeans + TransRateSD
plotCI(x = RateKonz, y = TransRateMeans, err='y', 
       type="p", col="blue", barcol="blue",
       sfrac = 0.01, gap=0, lwd=2,
       lty="solid", labels=FALSE, xlab = "Konzentration (M)", ylab = "Plasmolyserate (transformiert)", 
       li=TransRateSDminus, ui=TransRateSDplus)
abline(lm(PL$TransRate~PL$Konz), lwd=2, col="blue")